Skip to content

Conversation

@TheBlueMatt
Copy link
Collaborator

In 20877b3 we added a debug_assertion to validate that if we call
maybe_free_holding_cell_htlcs and it doesn't manage to generate a new commitment (implying !can_generate_new_commitment()) that we don't have any HTLCs to fail, but there was no reason for that, and its reachable.

Here we simply remove the spurious debug assertion and add a test that exercises it.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jan 14, 2026

👋 Thanks for assigning @wpaulino as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@TheBlueMatt TheBlueMatt force-pushed the 2026-01-spurious-debug-assertion branch from 873bee1 to 809a3f5 Compare January 14, 2026 01:35
In 20877b3 we added a
`debug_assert`ion to validate that if we call
`maybe_free_holding_cell_htlcs` and it doesn't manage to generate
a new commitment (implying `!can_generate_new_commitment()`) that
we don't have any HTLCs to fail, but there was no reason for that,
and its reachable.

Here we simply remove the spurious debug assertion and add a test
that exercises it.
@TheBlueMatt TheBlueMatt force-pushed the 2026-01-spurious-debug-assertion branch from 809a3f5 to b524b9b Compare January 14, 2026 02:15
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.57%. Comparing base (c5d7b13) to head (b524b9b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/functional_test_utils.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4312      +/-   ##
==========================================
- Coverage   86.59%   86.57%   -0.02%     
==========================================
  Files         158      158              
  Lines      102368   102367       -1     
  Branches   102368   102367       -1     
==========================================
- Hits        88641    88622      -19     
- Misses      11313    11328      +15     
- Partials     2414     2417       +3     
Flag Coverage Δ
fuzzing 36.94% <0.00%> (+<0.01%) ⬆️
tests 85.86% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheBlueMatt TheBlueMatt requested review from wpaulino and removed request for jkczyz January 14, 2026 15:14
Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Landing with one approval given the change is trivial and has test coverage.

@ldk-reviews-bot
Copy link

👋 The first review has been submitted!

Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.

@wpaulino wpaulino merged commit b4fb555 into lightningdevkit:main Jan 14, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants